﻿namespace UDKDevKitVSX.Classes
{
    using System;
    using UDKDevKitVSX.Interfaces;
    using UDKDevKitVSXCore.Classes;

    public class VSCommandListener : IpcCommandListener
    {
        private IUdkCommandInterface udkCommandInterface;
        public VSCommandListener(IUdkCommandInterface udkCommandInterface)
            : base("UDKSide")
        {
            this.udkCommandInterface = udkCommandInterface;
        }

        protected override void OnProcessCommand(string command)
        {
            this.udkCommandInterface.Send(command);
        }

        protected override void OnClose()
        {
            this.udkCommandInterface.Close();
        }
    }
}
